<template>
  <div>
    <video-form></video-form>
    <!-- mydid 目录_id 
          myCDid 课程的_id  -->
    <video-table :mydid="did"
                 :myCDid="CDid"
                 :pageStart="videoData.pageStart"
                 :pageSize="videoData.pageSize"
                 :videoList="videoData.list"
                 :count="videoData.count"></video-table>
  </div>
</template>
<script>
import videoForm from './videoForm'
import videoTable from './videoTabel.vue'
import { getVideoList } from '../../api/video'
export default {
  name: 'Ljfvue2011Index',
  components: {
    videoForm,
    videoTable
  },
  props: ["did", "CDid"],
  beforeMount () {

  },
  data () {
    return {
      videoData: {},
    };
  },
  mounted () {

  },
  created () {
    this.getVideo(1);
  },
  methods: {
    // 获取视频列表接口
    async getVideo (pageStart, searchText) {
      var res = await getVideoList({
        pageStart,
        searchText
      })
      console.log(res)
      this.videoData = res.data.data
    }
  },
};
</script>

<style lang="less" scoped>
</style>